<template>
	<view class="interventionBox">
		<!-- 选择会员 -->
		<view class="selectMember">
			<view class="member" @click="isChoose?dialog = true:false">
				<image src="../../../static/img/quickly/information/add@2x.png"></image>
				<text>{{userName || '选择会员'}}</text>
			</view>
			<view class="save" @click="showModalbtn(1)">保存</view>
			<view class="toSend" @click="showModalbtn(2)">签名发送</view>
		</view>
		
		<view class="mainContent">
			<!-- 总目标 -->
			<view class="totalGoal">
				<view class="totalHead">
					<view class="title">总目标</view>
					<view class="describe">总体目标是长远的、广义的和比较笼统的预期影响和效果。</view>
				</view>
				<textarea placeholder="请输入" v-model="objective"></textarea>
			</view>
			
			<!-- 具体目标 -->
			<view class="specificGoals">
				<view class="totalHead">
					<view class="title">具体目标 <image src="../../../static/img/quickly/internation/tips@2x.png"  @click="speciShow = true"></image></view>
					<view class="describe">具体目标必须是具体的和可以测量的具体项目，包括认知目标、行为目标和健康目标。</view>
				</view>
				<view class="specificContent">
					<view class="box">
						<view class="fillIn" v-for="(item,index) in specificTarget" :key="index">
							<view class="left">
								<label>{{index+1}}.</label>
								<editor :id="'specificTarget'+index" class="uni-input commentInput ql-container2"  @input="editorInput2"  @focus="editIndex = index,editData = specificTarget"></editor>
							</view>
							<image src="../../../static/img/quickly/internation/closeFollow.png" mode="widthFix" @click="delSymptomType(index,specificTarget)"></image>
						</view>
					</view>
					<view class="add">
						<image src="../../../static/img/quickly/internation/add@2x.png"></image>
						<text @click="specificTarget.push({value:''})">添加一条</text>
					</view>
				</view>
			</view>
			
			<!-- 干预策略 -->
			<view class="interventionStrategy">
				<view class="title">干预策略</view>
				<view class="specificContent">
					<view class="box">
						<view class="fillIn" v-for="(item,index) in managePolitic" :key="index">
							<view class="left">
								<label>{{index+1}}.</label>
								<editor :id="'managePolitic'+index" class="uni-input commentInput ql-container2"  @input="editorInput2"  @focus="editIndex = index,editData = managePolitic"></editor>
							</view>
							<image src="../../../static/img/quickly/internation/closeFollow.png" mode="widthFix" @click="delSymptomType(index,managePolitic)"></image>
						</view>
					</view>
					<view class="add">
						<image src="../../../static/img/quickly/internation/add@2x.png"></image>
						<text @click="managePolitic.push({value:''})">添加一条</text>
					</view>
				</view>
			</view>
			
			<!-- 健康危险因素干预处方 -->
			<view class="comment interventionStrategy">
				<view class="title">健康危险因素干预处方：</view>
				<view v-for="(item,index) in dangerous" :key="index">
					<view class="health" @click="addhealth(item,index)">
						<text class="healthEducation">{{item.name}}</text>
						<image src="@/static/img/quickly/internation/added@2x.png" mode="" class="addHealth"></image>
					</view>
					<view class="health_content" v-for="(healthImg,healthindex) in item.data" :key="healthindex">
						<input v-show="false" v-model="healthImg.schemeName" />
						<view class="delImage">
							<image src="@/static/img/quickly/internation/delect@2x.png" class="delScheme" @click="delThis(item,healthindex)"></image>
						</view>
						<view class="healthDetails">
							<text>项目：</text>
							<input type="text" class="uni-input" v-model="healthImg.item">
						</view>
						<view class="healthDetails">
							<text>剂量：</text>
							<input type="text" class="uni-input" v-model="healthImg.dosage">
						</view>
						<view class="healthDetails">
							<text>时间：</text>
							<input type="text" class="uni-input" v-model="healthImg.time">
						</view>
						<view class="healthDetails">
							<text>频率：</text>
							<input type="text" class="uni-input" v-model="healthImg.frequency">
						</view>
						<view class="healthDetails">
							<text>注意事项：</text>
							 <!-- @focus="editType = '',editIndex = index,editData = healthList" @input="editorInput" -->
							<editor :id="item.id+healthindex" class="uni-input commentInput ql-container2" @focus="editIndex = healthindex,editData = item.data" @input="editorInput" @ready="onEditorReady"></editor>
						</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 具体目标弹框 -->
		<u-mask :show="speciShow">
			<view class="warp">
				<view class="rect">
					<view class="rectItem">
						<text>认知目标：</text>如正常血压、血脂水平等知识 的具体百分比
					</view>
					<view class="rectItem">
						<text>行为目标：</text>血压测量技术、遵从医嘱行为 
					</view>
					<view class="rectItem">
						<text>健康目标：</text>自身血压、血脂、血糖下降等
					</view>
					<image class="rectImg" src="../../../static/img/quickly/internation/del.png" @click="speciShow = false"></image>
				</view>
			</view>
		</u-mask>
		<!-- 会员弹框 -->
		<member :dialog.sync="dialog"  @hidedialog="hidedialog" @chooseUser="chooseUser"></member>
		<u-modal v-model="showModal" :show-cancel-button="true" @confirm="Modalconfirm" :content="showContent"></u-modal>
	</view>
</template>

<script src="@/static/js/quickly/intervention/createIntervention"></script>

<style lang="scss" scoped>
	@import '@/static/css/quickly/intervention/createIntervention.scss';
</style>
